import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-welcome',
  templateUrl: './welcome.component.html',
  styleUrls: ['./welcome.component.less']
})
export class WelcomeComponent implements OnInit {
  option_echart = {
    
    title: {
      text: '第一个ehcartsh很长很长很长',
      link: 'http://baidu.com',
      target: 'self',
      textStyle: {
        color: "red",
        width: 100,
        overflow: 'ellipsis',
        ellipsis: '222',
        textBorderType: [5, 10],
        textBorderDashOffset: 5,
        textShadowColor: 'red',
        textShadowBlur: 100,
      },
      subtext: "我是副标题",
      subtextStyle: {
        color: 'blue',
        aligin: 'bottom'
      },
      itemGap: 30,
      triggerEvent: true,
      borderRadius: 500,
    },

    tooltip: {},
    toolbox: {
      show: true,
      feature: {
          dataZoom: {
              yAxisIndex: 'none'
          },
          dataView: {readOnly: false},
          magicType: {type: ['line', 'bar']},
          restore: {},
          saveAsImage: {}
      }
  },
    legend: {
      type: 'scroll',
      // orient: 'horitical',
      inactiveColor: 'gray',

      itemGap: 32,
      itemStyle: {
        borderJoin: "bevel",
        borderCap: 'round'
      },
      symbolSize: 100,
      data: ['销量'],
      textStyle: {
        fontStyle: 'italic'
      },
      tooltip: {
        show: true
      },
      // icon: 'pin',
      pageButtonItemGap: 122,
      pageButtonPosition: 'end',
      emphasis: {
        selectorLabel: {
          show:false,
          rotate: 90,
          distance:1000,

        },
      },
      selectorLabel:{
        rotate:90,
        distance:10000,
      },
      selector: [
        {
          type: 'all or inverse',
          // 可以是任意你喜欢的 title
          title: '全选'
        },
        {
          type: 'inverse',
          title: '反选'
        }
      ]


    },
    xAxis: {
      data: ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"]
    },
    yAxis: {
    },
    series: [{
      name: '销量',
      type: 'bar',
      data: [5, 20, 36, 10, 10, 6]
    }
    ]
  };

  constructor() { }

  ngOnInit() {
  }
}
